﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using Controllers;

namespace Wilke_Juleprojekt
{
    /// <summary>
    /// Interaction logic for Window4.xaml
    /// </summary>
    public partial class Window4 : Window
    {
        AdminController adminController;

        public Window4()
        {
            InitializeComponent();
             adminController = new AdminController();
        }

        private void btnOpretProjekt_Click(object sender, RoutedEventArgs e)
        {
            string navn = txtProjektNavn.Text;
            string beskrivelse = txtBeskrivelse.Text;

            adminController.OpretProjekt(navn, beskrivelse);

            MessageBox.Show(navn + " er oprettet.");
           
            Window5 projekter = new Window5();
            projekter.Show();
            this.Close();
            
        }
    }
}
